import type { LoginLogInfo, LoginLogQuery } from '@/types/login-log.type'
import type { ApiResponse, PageResult } from '@/types/common.type'
import request from '@/utils/request'

// 获取登录日志列表
export function getLoginLogList(params: LoginLogQuery): Promise<ApiResponse<PageResult<LoginLogInfo>>> {
  return request({
    url: '/api/system/login-log/page',
    method: 'post',
    data: params
  })
}

// 清空登录日志
export const cleanLoginLog = () => {
  return request.delete<ApiResponse<void>>('/api/system/login-log/clean')
} 